package cc.linker.steplink.crm.merchanth5.dao.acs;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface MerchantSalerDao {

    Boolean addExtensionAgent(Map<String, String> params);

    List<Map<String, String>> getExtensionAgentList(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId);

    Integer getSonCustomerCount(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId, @Param(value = "payMode") Integer payMode);

    Integer getSonCustomerCountBack(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId, @Param(value = "type") Integer type);

    List<Map<String, String>> getCustomerSonListAgent(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId, @Param(value = "payMode") Integer payMode);

    List<Map<String, Object>> getCustomerSonList(Map<String, Object> param);

    Map<String, String> getCustomerBaseInfo(@Param(value = "customerId") String customerId);

    String getPromoterName(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId);

    Map<String, String> getSalerInfo(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId);

    Map<String, String> getStoreInfo(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId, @Param(value = "customerType") Integer customerType);

    Map<String, String> getOrgInfo(@Param(value = "orgId") String orgId);

    Integer getAgentCount(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId);

    Integer getcAgentCount(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId);

    Integer getMerchantOrderCount(@Param(value = "customerId") String customerId);

    Integer getMerchantOrderCountToday(@Param(value = "customerId") String customerId);

    Integer getMerchantOrderCountToSend(@Param(value = "customerId") String customerId);

    Integer getSumGoodsMoney(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId);

    Integer getSumGoodsMoneyToday(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId);

    Integer getProfitWithdrawable(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId);

    Long getProfitToSettlement(@Param(value = "customerId") String customerId, @Param(value = "orgId") String orgId);

    void addSalerNum(String orgId);

    void addPromoterNum(String orgId);

    void addAgentNum(String orgId);

    Integer checkSaler(String orgId);

    Integer checkPromoter(String orgId);

    Integer checkAgent(String orgId);

    List<Map<String, Object>> getPageList(@Param(value = "orgId") String orgId, @Param(value = "customerId") String customerId);

    List<Map<String, Object>> getPageImageList(String moduleId);

    List<Map<String, Object>> getGoodsByGroupId(@Param(value = "groupId") Integer groupId, @Param(value = "showNum") Integer showNum, @Param("orgId") String orgId, @Param("type") int type, @Param("customerId") String customerId, @Param("moduleType") Integer moduleType,@Param("isAll") Integer isAll);

    Integer getGoodsCountByGroupId(@Param("groupId") Integer goodsGroupId, @Param("type") int type, @Param("customerId") String customerId, @Param("orgId") String orgId, @Param("moduleType") Integer moduleType);

    List<Map<String, Object>> getPageEnrollList(@Param("id") String id, @Param("showNum") Integer showNum, @Param("isAll") Integer isAll);

    Integer getEnrollCount(String id);

    List<Map<String, Object>> getPageAllEnrollList(Map<String, Object> param);

    Map<String, Object> getSwitch(Map<String, Object> param);

    Map<String,Object> getCustomerCheck(Map<String, Object> param);

    Map<String, Object> getCustomerCheckInfo(Map<String, String> param);

    List<Map<String, Object>> getSalerPromoterSonBillList(@Param("pcustomerId") String pcustomerId, @Param("customerId") String customerId);

    List<Map<String, Object>> getListGoodsCustom(Map<String, Object> param);

    Integer getListGoodsCustomCount(Map<String, Object> param);

    List<Map<String, Object>> getListIntGoodsCustom(Map<String, Object> param);

    Integer getListIntGoodsCustomCount(Map<String, Object> param);

    Long getUserTotalVolume(@Param("pCustomerId") String pCustomerId, @Param("type") int type, @Param("orgId") String orgId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Long getUserTotalVolumeScore(@Param("pCustomerId") String pCustomerId, @Param("type") int type, @Param("orgId") String orgId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Integer getOrderCount(@Param("pCustomerId")String customerId, @Param("orgId")String orgId);
    Integer getEnrollOrderCount(@Param("pCustomerId")String customerId, @Param("orgId")String orgId);

    Long getSettleFee(String customerId);

    void reducePromoterNum(String orgId);

    List<Map<String, Object>> getAllPromoterList();

    Integer getTodaySonCount(Map<String, Object> param);

    Integer getTodayAllRebate(Map<String, Object> param);

    Integer getTodayServiceFee(Map<String, Object> param);

    Integer getTodayRecommendFee(Map<String, Object> param);

    void saveAchievementSettlement(Map<String, Object> param);

    Long getSonSettleFee(Map<String, Object> data);

    Long getSonTotalVolume(Map<String, Object> data);

    Long getSonTotalVolumeScore(Map<String, Object> data);

    Map<String, Object> getCustomerInfo(Map<String, Object> param);

    Long getTotalBackFee(Map<String, Object> param);

    Long getUserTotalCash(Map<String, Object> param);

    List<Map<String, Object>> getAchieveList(Map<String, Object> param);

    Integer getSonOrderCount(Map<String, Object> param);

    Integer getSonEnrollOrderCount(Map<String, Object> param);

    List<Map> selectOpenData(String ymd);

    void addbalance(Map map);

    List<Map<String, Object>> orderListFreeze(Map<String, Object> params);

    Map<String, Object> getMerchantOrderInfoByOrderSn(@Param("orderSn") String orderSn);

    Map<String, Object> getSalerOrderInfoByOrderSn(@Param("orderSn") String orderSn);

    Map<String, Object> getEnrollRecordInfoByOrderSn(@Param("orderSn") String orderSn);

    List<Map<String, Object>> tradeListFreeze(Map<String, Object> x);

    void reduceAgentNum(String orgId);

    List<Map<String, Object>> getCustomPosterList(Map<String, Object> params);

    List<Map<String, Object>> getSonCustomerList(@Param("customerId") String customerId);

    Long getCrossUserTotalVolume(@Param("pCustomerId") String pCustomerId, @Param("parentSaveTime") String parentSaveTime, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Long getCrossUserTotalVolumeScore(@Param("pCustomerId") String pCustomerId, @Param("parentSaveTime") String parentSaveTime, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Long getAuthorFee(@Param("customerId") String customerId, @Param("orgId") String orgId,  @Param("startTime") String startTime, @Param("endTime") String endTime);

    String getGoodsGroupNameById(@Param("goodsGroupId") String goodsGroupId);

    Map<String, Object> getvipLogInfoByOrderSn(@Param("orderSn") String orderSn);

    Map<String, Object> getFooter(String customerId);

    Map<String, Object> getPageInfo(Integer pageId);

    List<Map<String, Object>> getModuleListById(Integer pageId);

    List<Map<String, Object>> getModuleImageListById(String id);

    List<Map<String, Object>> getFooterItem(int id);

    Integer getHomePageIdByCustomerId(@Param("customerId") String customerId);

    Map<String, Object> getIntegralOrderInfoByOrderSn(@Param("orderSn") String orderSn);

    List<String> getPageNewEnrollList(@Param("id") String id);

    Map getInfo(@Param("orgId") String orgId);

    List<Map> getSubs(@Param("windowId") String windowId);

    Long getHomePageId(@Param("orgId") String orgId);

    List<Map<String, Object>> getVideoModuleImageListById(@Param("id") String id);

    List<Map<String, Object>> getPageVipList(@Param("id") String id);

    List<Map<String, Object>> getMarkingsByOrgId(@Param("orgId") String orgId,@Param("isH5") boolean isH5);

    void insertDefaultMarking(@Param("orgId") String orgId);

    List<Map<String, Object>> getPageCouponList(@Param("id") String id);

    Map<String, Object> getFormInfoByOrderSn(String orderSn);

    Map getUserCenter(@Param("orgId") String orgId);

    Map<String, Object> getCouponGoodsData(@Param("couponId") String couponId);

    Integer getSignStatus(@Param("orgId") String orgId);
}
